package com.ysd.lis.controller.bac;

import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.bac.BacReqPurposeFeeItem;
import com.ysd.lis.entity.bac.BacReqPurposeSampletype;
import com.ysd.lis.request.bac.PurposeDto;
import com.ysd.lis.request.bac.PurposeItemParam;
import com.ysd.lis.service.bac.BacReqPurposeSampletypeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 检验目的对应标本类型 前端控制器
 * </p>
 *
 * @author WH
 * @since 2024-10-17
 */
@RestController
@RequestMapping("/api/bac/bacReqPurposeSampletype")
public class BacReqPurposeSampletypeController extends BaseController {

    @Autowired
    private BacReqPurposeSampletypeService bacReqPurposeSampletypeService;

    @ApiOperation("查询")
    @GetMapping("/findPurposeSampletypeList")
    public Result findPurposeSampletypeList(PurposeItemParam param){
        return bacReqPurposeSampletypeService.findPurposeSampletypeList(param);
    }
    @ApiOperation("新增或编辑")
    @PostMapping("/addPurposeSampletype")
    public Result addPurposeSampletype(@RequestBody List<BacReqPurposeSampletype> bacReqPurposeSampletype){
        return  bacReqPurposeSampletypeService.addPurposeSampletype(bacReqPurposeSampletype);
    }

    @ApiOperation("批量删除")
    @PostMapping("/deleteBatchPurposeSampletype")
    public Result deleteBatchPurposeSampletype(@RequestBody List<BacReqPurposeSampletype> bacReqPurposeSampletype){
        return  bacReqPurposeSampletypeService.deleteBatchPurposeSampletype(bacReqPurposeSampletype);
    }

}
